Skip to content

ffi: include SharedArrayBuffer in error message - #65735

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:ffi-sharedArrayBuffer-err-msg
Sep 4, 2026
Merged

ffi: include SharedArrayBuffer in error message#65735
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:ffi-sharedArrayBuffer-err-msg

Conversation

@HoonDongKang

Copy link
Copy Markdown
Contributor

ExportBytes() accepts SharedArrayBuffer inputs:

if (args[0]->IsArrayBuffer() || args[0]->IsSharedArrayBuffer() ||
    args[0]->IsArrayBufferView()) {

However, its invalid argument messages do not include SharedArrayBuffer in the list of supported input types.

- The first argument must be a Buffer, ArrayBuffer, or ArrayBufferView
+ The first argument must be a Buffer, ArrayBuffer, SharedArrayBuffer, or ArrayBufferView
  • Updated both invalid argument messages in ExportBytes().
  • Aligned the messages with the existing input validation behavior.

ExportBytes accepts SharedArrayBuffer inputs, but its invalid argument
messages do not list SharedArrayBuffer as a supported input type.

Signed-off-by: HoonDongKang <d159123@naver.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Sep 2, 2026
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.05%. Comparing base (1309975) to head (b7c5af9).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
src/ffi/data.cc 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65735      +/-   ##
==========================================
+ Coverage   89.98%   90.05%   +0.06%     
==========================================
  Files         755      755              
  Lines      257282   257282              
  Branches    48776    48797      +21     
==========================================
+ Hits       231525   231700     +175     
+ Misses      16841    16680     -161     
+ Partials     8916     8902      -14     
Files with missing lines Coverage Δ
src/ffi/data.cc 75.71% <0.00%> (ø)

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@daeyeon daeyeon added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 2, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 2, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 3, 2026
@nodejs-github-bot
nodejs-github-bot merged commit f8d6d75 into nodejs:main Sep 4, 2026
89 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in f8d6d75

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 4, 2026
aduh95 pushed a commit that referenced this pull request Sep 7, 2026
ExportBytes accepts SharedArrayBuffer inputs, but its invalid argument
messages do not list SharedArrayBuffer as a supported input type.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: #65735
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 7, 2026
ExportBytes accepts SharedArrayBuffer inputs, but its invalid argument
messages do not list SharedArrayBuffer as a supported input type.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: #65735
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants